I am looking for worst case of Shell sort.
According to this, the worst case is O(N^3/2)
but here, it is claimed that the worst case is O((N log N)^2))
.
I think that worst case should be a a sequence containing largest vales in odd positions. However, here some gap sequences are introduced with Θ(N^3/2)
complexity.
I am trying to figure out what is the actual worst case for Shell sort. So far, according to aforementioned paper, the worst case is O((N log N)^2))
not Θ(N^3/2)
. In addition, here suggested a worst scenario analysis, that apparently, is not Θ(N^3/2)
.
Here, a time complexity analysis is done on a certain algorithm with O(N^2)
as its worst case.
But, I am completely lost. What is the worst case for Shell sort?